import http from "@/utils/http";
//获取入库申请列表
export function TransferIn_tabList(auditState, params) {
  return http.post("/by-transfer-apply/select/page/" + auditState, params);
}
//待发头程入库申请列表
export function TransferIn_update(ApplyId, params) {
  return http.post("/by-transfer-apply/update/3/Apply/" + ApplyId, params);
}
//获取新增箱子编号
export function box_no() {
  return http.get("/by-warehousing-apply/box-no");
}
//获取表头统计
export function TransferIn_statecount(businessType, auditState) {
  return http.post(
    "/by-transfer-apply/select/tips/" + businessType + "/" + auditState
  );
}
//获取国际物流列表
export function SKU_TypeData(params) {
  return http.post("/sys-tag-dictionary/treeTagDictionary", params);
}
//查询各状态条数
export function SKU_TypeCount() {
  return http.get("/by-warehousing-apply/state-count");
}
//新增入订单数据
export function transferIn_save(params) {
  return http.post("/by-transfer-apply/save", params);
}
//表格每一行详情数据
export function getByApplyId(transferWarehousingApplyId) {
  return http.post("/by-transfer-apply/select/" + transferWarehousingApplyId);
}
//修改每一行数据
export function updateApplyInfo(ApplyId, params) {
  return http.post("/by-transfer-apply/update/01/Apply/" + ApplyId, params);
}
//修改申请数据
export function updateByApplyInfo(params) {
  return http.put("/by-warehousing-apply/updateByApplyInfo", params);
}
//提交订单
export function TransferOut_submit(WarehousingApplyId) {
  return http.post(
    "/by-transfer-apply/updateSubmit/audit/01/" + WarehousingApplyId
  );
}
//删除入库申请
export function TransferOut_del(transferWarehousingApplyId, params) {
  return http.post(
    "/by-transfer-apply/updateRevoke/audit/01/" +
      transferWarehousingApplyId +
      "/" +
      params
  );
}
//撤回入库申请
export function TransferOut_recallt(transferWarehousingApplyId, params) {
  return http.post(
    "/by-transfer-apply/updateRevoke/audit/23/" +
      transferWarehousingApplyId +
      "/" +
      params
  );
}
//撤回订单
export function undo_Order(params) {
  return http.put("/by-warehousing-apply/undo/" + params);
}
//代发头程信息列表提交数据
export function updateByFba(params) {
  return http.put("/by-warehousing-apply/updateByFba/" + params);
}
//获取仓库数据
export function warehouse(params) {
  return http.post("/by-warehouse/select", params);
}
//下载模板
export function upDow() {
  return http.blob("/by-warehousing-apply/mergeWrite");
}
//入库订单保存本次接收记录
export function saveItem(params) {
  return http.post("/by-transfer-warehousing-receive/saveItem" + "/0", params);
}
//在途中确认接收
export function updateWaitSendFba(WarehousingApplyId, audit, revision, params) {
  return http.post(
    "/by-transfer-apply/updateWaitSendFba/audit/4/" +
      WarehousingApplyId +
      "/" +
      audit +
      "/" +
      revision,
    params
  );
}
//从已接收退回在途中
export function backautit4(WarehousingApplyId, audit, revision) {
  return http.post(
    "/by-transfer-apply/updateWaitSendFba/audit/5/" +
      WarehousingApplyId +
      "/" +
      audit +
      "/" +
      revision
  );
}
//查询接受记录
export function warehousingReceive(applyId, boxId, type) {
  return http.post(
    "/by-transfer-warehousing-receive/list/" +
      applyId +
      "/" +
      boxId +
      "/" +
      type
  );
}
//查询箱子详情
export function searchBoxInfo(applyId, boxId) {
  return http.post("/by-transfer-warehousing-box/" + applyId + "/" + boxId);
}
//查询箱子接收情况
export function warehousingBoxInfo(applyId) {
  return http.post("/by-transfer-warehousing-box/count/" + applyId);
}

//客户端代发头程提交接口
export function update_ascertained(applyId) {
  return http.post("/by-transfer-warehousing-box/count/" + applyId);
}

//服务项登记搜索框查询
export function ser_service(business, tenantId, applyId) {
  return http.post(
    "/by-charged-service-items/select/" +
      business +
      "/" +
      tenantId +
      "/" +
      applyId
  );
}
//服务项登记保存接口
export function ser_saveList(applyId, params) {
  return http.post("/by-charged-service-items/save/" + applyId, params);
}
//服务项登记复现接口
export function ser_reappearance(business, applyId) {
  return http.post(
    "/by-charged-service-items/select/" + business + "/" + applyId
  );
}
//服务项登记修改接口
export function ser_editReappearance(business, applyId, params) {
  return http.post(
    "/by-charged-service-items/edit/quantity/" + business + "/" + applyId,
    params
  );
}
//服务项登记重置接口
export function ser_removeService(business, applyId) {
  return http.post(
    "/by-charged-service-items/remove/" + business + "/" + applyId
  );
}
